package com.cloudcc.mobile.dao.impl;

import com.cloudcc.cloudframe.net.async.EventRequest;
import com.cloudcc.mobile.dao.BaseEngine;
import com.cloudcc.mobile.dao.BullXiangGuanDao;
import com.cloudcc.mobile.entity.BullGzlxEntity;
import com.cloudcc.mobile.entity.BullJxsNewJob;
import com.cloudcc.mobile.entity.CallLogMatchEntity;
import com.cloudcc.mobile.event.BeauEventList;
import com.loopj.android.http.RequestParams;

import java.util.List;

/**
 * Created by lin on 2017/10/26.
 */

public class BullXiangGuanImpl extends BaseEngine implements BullXiangGuanDao{

    @Override
    public void BullgetJxs(String objectApiName, String expressions, String fields, BeauEventList.BullJxsEvent Event) {
        EventRequest<List<BullJxsNewJob>> eventRequest = new EventRequest<List<BullJxsNewJob>>() { };
        eventRequest.setEvent(Event);
        RequestParams params = new RequestParams();
        params.put("objectApiName", objectApiName);
        params.put("expressions", expressions);
        params.put("fields", fields);
        params.put("isAddDelete", false);
        sendPost(params, "cqueryWithRoleRight", eventRequest);

    }

    @Override
    public void BullgetMenD(String objectApiName, String expressions, String fields, BeauEventList.BullMenDianEvent Event) {
        EventRequest<List<BullJxsNewJob>> eventRequest = new EventRequest<List<BullJxsNewJob>>() { };
        eventRequest.setEvent(Event);
        RequestParams params = new RequestParams();
        params.put("objectApiName", objectApiName);
        params.put("expressions", expressions);
        params.put("fields", fields);
        params.put("isAddDelete", false);
        sendPost(params, "cquery", eventRequest);
    }

    @Override
    public void BullgetGzlx( String data, BeauEventList.BullGzlxEvent Event) {
        EventRequest<List<BullGzlxEntity>> eventRequest = new EventRequest<List<BullGzlxEntity>>() { };
        eventRequest.setEvent(Event);
        RequestParams params = new RequestParams();
        params.put("data", data);
        sendPost(params, "getPickListValue", eventRequest);
    }
}
